/**
 * 联系人API
 *
 * @Date 2021/4/5 12:39
 * @author 周世焕
 */

import axios from "@/libs/api.request";

/**
 * 保存联系人
 */
export function saveCustomer(data) {
    return  axios.request({
        url: '/v1/service/customer',
        data: data,
        method: 'post'
    })
}

/**
 * 查询联系人列表
 */
export function findCustomerList() {
    return  axios.request({
        url: '/v1/service/customer/list',
        method: 'get'
    })
}

/**
 * 查询联系人列表
 */
export function findCustomerById(customerId) {
    return  axios.request({
        url: '/v1/service/customer',
        method: 'get',
        params:{customerId}
    })
}

/**
 * 查询联系人关注列表
 */
export function findCustomerFollowList() {
    return  axios.request({
        url: '/v1/service/customer/followList',
        method: 'get'
    })
}

/**
 * 删除联系人
 */
export function deleteCustomer(customerId) {
    return  axios.request({
        url: '/v1/service/customer',
        params:{customerId},
        method: 'delete'
    })
}


/**
 * 关注联系人
 */
export function starCustomer(customerId) {
    return  axios.request({
        url: '/v1/service/customer/star',
        params:{customerId},
        method: 'post'
    })
}

/**
 * 关注联系人
 */
export function unStarCustomer(customerId) {
    return  axios.request({
        url: '/v1/service/customer/star',
        params:{customerId},
        method: 'delete'
    })
}
